#pragma once

#include <gofcl_dac_r.h>

typedef struct {
	u32_s SWTR0 : 1;
	u32_s SWTR1 : 1;
	u32_s : 30;
} dac_swt_s;

_Static_assert(sizeof(dac_swt_s) == 4, "Struct dac_swt_s defined error!");

static inline void dac_wreg_swt_s(dac_swt_s swt) {
	union {
		dac_swt_s s;
		u32_s u;
	} su = {
		.s = swt,
	};
	dac_wreg(DAC_SWT_R, su.u);
}
